package com.gxxy.spring.kp02_modules.cls02_container.s3_factorybeancreate;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class FactoryCreateBeanTest {

	@Autowired
	ApplicationContext appCtx;

	@Test
	public void testStaticCreateBean() throws Exception {
		IFactoryCreateBean bean = appCtx.getBean("testFactoryCreateBean",
				IFactoryCreateBean.class);
		bean.testFactoryCreateBean();
	}

}
